﻿Public Class Form1
  Private Sub Button1_Click(ByVal sender _
          As System.Object, _
          ByVal e As System.EventArgs) _
          Handles Button1.Click
    Dim NL As String = Environment.NewLine
    Try
      My.Computer.FileSystem.ReadAllText("" & _
          "C:\prova123.txt")
    Catch ex As  _
            System.IO.FileNotFoundException
      MessageBox.Show("ERRORE: " & _
          "File non trovato" & _
          NL & NL & ex.Message & _
          NL & NL & ex.StackTrace)
    Catch ex As Exception
      MessageBox.Show("Eccezione " & _
          "generica: verificare " & _
          "il codice" & _
          NL & NL & ex.Message & _
          NL & NL & ex.StackTrace)
    End Try
  End Sub
End Class
